package com.hevery.service;

import com.hevery.domain.Girl;
import com.hevery.repository.GirlRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 * @Author: Hevery
 * @Description:
 * @Date: Created on 2017/9/15
 * @Modified By:
 */
@Service
public class GirlService {

    @Autowired
    private GirlRepository girlRepository;

    @Transactional
    public void insertTwo(){

        Girl girlA = new Girl();
        girlA.setAge(18);
        girlA.setCupSize("A");
        girlRepository.save(girlA);

        Girl girlB = new Girl();
        girlA.setAge(18);
        girlA.setCupSize("BBBBB");
        girlRepository.save(girlB);

    }

}
